package phoenix.web.page_objects;

import phoenix.core.PhoenixManager;
import phoenix.core.base.extensions.PageBaseWebExt;
import phoenix.core.config.extensions.ConfigExt;
import phoenix.web.locators.base.ChatRoomsPageLocatorBase;
import phoenix.web.locators.base.ForumPageLocatorBase;

/**
 * Created by AlexGolovko on 15.11.2014.
 */
public class ForumPage extends PageBaseWebExt
{
	/**
	 * Initializes PageBaseWebExt
	 * @param p_manager PhoenixManager instance
	 */
	public ForumPage(PhoenixManager p_manager)
	{
		super(p_manager);
	}

	public ForumPageLocatorBase elements()
	{
		switch (manager.testModel().getSiteName())
		{
			case ConfigExt.SITE_ID_WILDBUDDIES:
			{
				return new phoenix.web.locators.wildbuddies.ForumPageLocators();
			}
			case ConfigExt.SITE_ID_BENAUGHTY:
			{
				return new phoenix.web.locators.benaughty.ForumPageLocators();
			}
			default:
			{
				return null;
			}
		}
	}

	public void waitForPageLoad()
	{
		wd().waitForVisibility(elements().blockSiteLogo, "Site logo");
	}
}
